<p class="edit_link"><%= link_to_remote "edit", :update => "milestone_#{milestone.id}", :url => show_remote_form_admin_milestone_path(milestone), :method => :get %></p>
<p class="destroy_link"><%= link_to 'delete', admin_milestone_url(milestone.id), :confirm => 'Are you sure?', :method => :delete %></p>
<h3><%= milestone.title %></h3>

<div class="span-4">
  <dl>
    <dt>Started On</dt>
    <dd><%= milestone.started_on.to_s(:long) %></dd>
  
    <% unless milestone.completed_on.blank? %>
      <dt>Completed On:</dt>
      <dd><%= milestone.completed_on.to_s(:long) %></dd>
    <% end %>
  
    <dt>Status</dt>
    <dd><%= STATUS_CODES.select{|s| s[:db_code] == milestone.status_code}.first[:text] %></dd>
  </dl>
</div>


<div class="span-13 last description"><%= milestone.description_html %></div>

<% unless milestone.tasks.blank? %>
  <table class="tasks">
    <caption>Tasks for <%= milestone.title %></caption>
    <thead>
      <tr>
        <th class="title">Title</th>
        <th class="sub_contractor_id">Sub-Contractor</th>
        <th class="started_on">Started</th>
        <th class="status_code">Status</th>
        <th class="completed_on">Completed</th>
      </tr>
    </thead>
    <tbody>
    
      <% milestone.tasks.each do |task| %>
        <tr>
          <%= render :partial => "admin/tasks/show", :locals => {:task => task, :show_actions => false, :row_wrap => true} %>
        <tr>
      <% end %>
    
    </tbody>  
  </table>
<% end %>